package erp.education.server.db.implementation.setup.school;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import erp.education.server.db.entites.setup.school.StudentExtraInfo;
import erp.education.server.db.implementation.common.BaseDAO;
import erp.education.server.db.interfaces.setup.school.StudentExtraInfoDAOI;

@Component("studentExtraInfoDao")
public class StudentExtraInfoDAO extends BaseDAO implements
		StudentExtraInfoDAOI {

	@Override
	public StudentExtraInfo getStudentExtraInfo(String lableName) {
		// TODO Auto-generated method stub
		StudentExtraInfo studentExtraInfo = null;
		Map params = new HashMap();
		params.put("lableName", lableName);

		studentExtraInfo = (StudentExtraInfo) getSingleResult(
				"select studentExtraInfo from StudentExtraInfo studentExtraInfo where studentExtraInfo.lableName=:lableName",
				params);

		return studentExtraInfo;
	}

	@Override
	public List<Object[]> getStudentExtraInfo() {
		// TODO Auto-generated method stub
		List<Object[]> studentExtraInfo = null;
		Map params = new HashMap();
		studentExtraInfo = (List<Object[]>) getResultList(
				"select studentExtraInfo.stdExtraInfoId,studentExtraInfo.lableName,studentExtraInfo.lableType,studentExtraInfo.infoType,studentExtraInfo.status from StudentExtraInfo studentExtraInfo ",
				params);
		return studentExtraInfo;

	}
}
